package com.iwat.enumeration;

/**
 * @Author wangweiqiang
 * @Classname EnumEventMessageType
 * @Date 2022/3/27 15:25
 * @Description TODO
 */
public enum EnumEventMessageType {
    SUBSCRIBE("subscribe", "订阅"),
    UNSUBSCRIBE("unsubscribe", "取消订阅"),
    CLICK("CLICK", "自定义菜单点击事件"),
    SCAN("SCAN", "用户已关注时的事件推送");

    private String type;
    private String content;

    EnumEventMessageType(String type, String content) {
        this.type = type;
        this.content = content;
    }

    public static EnumEventMessageType getEnum(String eventType) {
        if (eventType.equals(SUBSCRIBE.type)){
            return SUBSCRIBE;
        }else if(eventType.equals(UNSUBSCRIBE.type)){
            return UNSUBSCRIBE;
        }else if(eventType.equals(CLICK.type)){
            return CLICK;
        }else if(eventType.equals(SCAN.type)){
            return SCAN;
        }
        return null;
    }
}

